<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<?php
include("conn/conn.php");
$sql_v="select * from tb_video order by id desc limit 0.4";

$sql_maxv="select * from tb_video where downTinme=(select max(downTime)from tb_video)";

$result_v=mysqli_query($link,$sql_v);

$result_maxv=mysqli_query($link,$sql_maxv); 

?>
<table width="900" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
    <!--最大一条记录-->
    <?php
    if(mysqli_num_rows($result_maxv)>0){
		$row_maxv=mysqli_fetch_assoc($result_maxv);
		?>
	<table width="100%">
	<tr><td><img src="upfiles/video/<?=$row_maxv[picture]?>" width="450" height="500"></td></tr>
	<tr><td><?=$row_maxv[name]?></td></tr>
	<tr><td><?=$row_maxv[remark]?></td></tr>
	</table>
    <?php
	}
	else{
	echo("没有这个电影");
		}
	?>
    </td>
    <td>
    <?php
	if (mysqli_num_rows($result_v)>0){
		$num=0;
	?>
    <table width="100%">
    <?php
	while ($row_v=mysqli_fetch_assoc($result_v)){
	if($num % 2==0){
		?>
	<tr>
	<?php
	} 
	?>
		<td>
		<table width="100%">
		<tr><td><img src="upfiles/video/<?=$row_v[picture]?>" width="180"height="120"/></td></tr>
		<tr><td><?=$row_v[name]?></td></tr>
		<tr><td><?=$row_v[remark]?></td></tr>
		</table>
		</td>
        <?php	
	
	if($num % 2 !=0){
		?>
		</tr>
        <?php
	}
	$num++;
	}
    ?>
	</table>
    <?php
	
	}
	else{
		echo(没有这些电影);
	}
	?>
    </td>
  </tr>
</table>
</body>
</html>